getenv("CONTENT_LENGTH") 放的是什么
来源:百度知道 编辑:UC知道 时间:2024/06/14 13:19:37
用C语言编写CGI:用GET方法已经实现了,对表单数据的接收和处理;但用POST方法后,我将表单改为<form method="post" action=...>;程序里的buf=getenv("QUERY_STRING")改为buf=getenv("CONTENT_LENGTH");下面什么都不做,只输出buf的内容也无法显示结果出来。怎么修改好呢?我的程序如下:#include<stdio.h>
#include<stdlib.h>
#include<string.h>
void main()
{
char *buf;
char name[20],number[20],input[20];
int n;
printf("Content-Type:text\n\n");
printf("<html><body>");
printf("<title>表单</title>");
printf("</head><body bgcolor=\"#ffffff\">");
printf("<h3 align=\"center\">");
printf("写一个具有表单的cgi页面,点击递交后,可以转到另外一个页面并显示原表单各项内容</h3>");
printf("<hr color=\"#ff8000\">");
if(getenv("CONTENT_LENGTH"))
n= atoi(getenv(&quo
#include<stdlib.h>
#include<string.h>
void main()
{
char *buf;
char name[20],number[20],input[20];
int n;
printf("Content-Type:text\n\n");
printf("<html><body>");
printf("<title>表单</title>");
printf("</head><body bgcolor=\"#ffffff\">");
printf("<h3 align=\"center\">");
printf("写一个具有表单的cgi页面,点击递交后,可以转到另外一个页面并显示原表单各项内容</h3>");
printf("<hr color=\"#ff8000\">");
if(getenv("CONTENT_LENGTH"))
n= atoi(getenv(&quo
http://tools.ietf.org/html/rfc2616#section-14.13
14.13 Content-Length
The Content-Length entity-header field indicates the size of the
entity-body, in decimal number of OCTETs, sent to the recipient or,
in the case of the HEAD method, the size of the entity-body that
would have been sent had the request been a GET.
Content-Length = "Content-Length" ":" 1*DIGIT
An example is
Content-Length: 3495
Applications SHOULD use this field to indicate the transfer-length of
the message-body, unless this is prohibited by the rules in section
4.4.
主要就是你数出网页的byte数
相关网页
http://www.wangchao.net.cn/bbsdetail_73981.html
co.,ltd后面到没有"."
请问:什么是"猎头公司",什么是"CO-CFO"
英文Co.公司,Ltd.为(股份)有限公司,为什么在译"某某股份有限公司"时,却被译成"****Co.,Ltd.",这样译合适吗
"core"怎么读成"酷睿",词典读成"[co:]",请解释一下
co cuo co cu2o
356. 为什么有限公司的缩写"co.,ltd"中间要有逗号呢?
请问"有限公司"这四个字可不可以直接用英文 Limited 而不是CO.,LTD
"含C且能燃烧的化合物是有机物”对吗?那CO是不是有机物呢?
·韩文发音"ko"是姓氏"高"的意思,那"co"是哪个姓氏??谢谢
CO.,LTD.